package com.strato.queue.v1_0_0.activator;

import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

import com.strato.base.osgi.v1_0_0.BundleUtil;
import com.strato.queue.v1_0_0.exec.annotation.handler.QueueConsumerAnnotationHandler;

public class Activator implements BundleActivator {

	private static BundleContext context;

	@Override
	public void start(BundleContext bundleContext) throws Exception {
		context=bundleContext;
		QueueConsumerAnnotationHandler handler=new QueueConsumerAnnotationHandler();
		BundleUtil.exportServices(bundleContext, handler, null, null);
	}

	@Override
	public void stop(BundleContext bundleContext) throws Exception {
		context=null;
	}

	public static BundleContext getContext() {
		return context;
	}

}
